<script>
export default {
	onLaunch: function (options) {
		// console.log(uni.$u.config.v);
		this.$store.dispatch('user/getUserInfo')
		let updateManager = uni.getUpdateManager()
		updateManager.onCheckForUpdate(function (res) {
		  console.log('onCheckForUpdate', res.hasUpdate)
		})
		
		updateManager.onUpdateReady(function () {
		  uni.showModal({
		    title: '更新提示',
		    content: '新版本已经准备好,是否重启应用?',
		    showCancel: false,
		    mask: true,
		    success(res) {
		      if (res.confirm) {
		        updateManager.applyUpdate()
		      }
		    }
		  })
		})
		
		updateManager.onUpdateFailed(function () {
		  uni.showToast({
		    title: '版本下载失败',
		    mask: true
		  })
		})
	},
	methods: {

	},
	onShow: function (options) {

	},
	onHide: function () {
		console.log('App Hide')
	}
	
}
</script>
<style>
	page{
		background: rgba(249, 249, 249, 1);
		/* background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 250, 242, 1) 100%); */
	}
	.pacestye{
		color: rgba(156, 156, 156, 1);
	}
</style>
<style lang="scss">
	::-webkit-scrollbar{
	      display: none;
	}
	@import "uview-ui/index.scss";
</style>
